package com.ruoyi.base.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.BaseFlowTypeMapper;
import com.ruoyi.base.domain.BaseFlowType;
import com.ruoyi.base.service.IBaseFlowTypeService;

/**
 * 工单类别Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-15
 */
@Service
public class BaseFlowTypeServiceImpl implements IBaseFlowTypeService 
{
    private static final Logger log = LoggerFactory.getLogger(BaseFlowTypeServiceImpl.class);

    @Autowired
    private BaseFlowTypeMapper baseFlowTypeMapper;

    /**
     * 查询工单类别
     * 
     * @param id 工单类别主键
     * @return 工单类别
     */
    @Override
    public BaseFlowType selectBaseFlowTypeById(Long id)
    {
        return baseFlowTypeMapper.selectBaseFlowTypeById(id);
    }

    /**
     * 查询工单类别列表
     * 
     * @param baseFlowType 工单类别
     * @return 工单类别
     */
    @Override
    public List<BaseFlowType> selectBaseFlowTypeList(BaseFlowType baseFlowType)
    {
        return baseFlowTypeMapper.selectBaseFlowTypeList(baseFlowType);
    }

    /**
     * 新增工单类别
     * 
     * @param baseFlowType 工单类别
     * @return 结果
     */
    @Override
    public int insertBaseFlowType(BaseFlowType baseFlowType)
    {
        baseFlowType.setCreateTime(DateUtils.getNowDate());
        return baseFlowTypeMapper.insertBaseFlowType(baseFlowType);
    }

    /**
     * 修改工单类别
     * 
     * @param baseFlowType 工单类别
     * @return 结果
     */
    @Override
    public int updateBaseFlowType(BaseFlowType baseFlowType)
    {
        baseFlowType.setUpdateTime(DateUtils.getNowDate());
        return baseFlowTypeMapper.updateBaseFlowType(baseFlowType);
    }

    /**
     * 批量删除工单类别
     * 
     * @param ids 需要删除的工单类别主键
     * @return 结果
     */
    @Override
    public int deleteBaseFlowTypeByIds(Long[] ids)
    {
        return baseFlowTypeMapper.deleteBaseFlowTypeByIds(ids);
    }

    /**
     * 删除工单类别信息
     * 
     * @param id 工单类别主键
     * @return 结果
     */
    @Override
    public int deleteBaseFlowTypeById(Long id)
    {
        return baseFlowTypeMapper.deleteBaseFlowTypeById(id);
    }


}
